**# Bookmark #1 Setting

*Windows
global root  = "G:/Dropbox/Environmental Injustice/Empirical"
global rawdata = "$root/rawdata"
global workdata = "$root/workdata"
global results = "$root/results"
global outfile = "$root/outfile"

cd "$workdata"

**# Bookmark #2 Regression

global control1 i.Riverpolicy##i.riverpost
global control2 RCP
global control3 list

foreach i in control1 control2 control3{

*Column 1
use "$outfile/Table S17 heartandday.dta",clear
	
reghdfe heart lowedu5_post_notapwater lowedu5_post lowedu5_notapwater notapwater_post lowedu5 notapwater post $`i' ,absorb(i.id i.province#i.year) cluster(i.province i.year)

outreg2 using "$results/Table S17.xls",append ctitle("Cardiovascular Disease") ///
keep(lowedu5_post_notapwater lowedu5_post) ///
addtext(Individual FE, YES, ProvincebyYear FE, YES) ///
bdec(3) tdec(3) rdec(3)

*Column 2
reghdfe day lowedu5_post_notapwater lowedu5_post lowedu5_notapwater notapwater_post lowedu5 notapwater post $`i' ,absorb(i.id i.province#i.year) cluster(i.province i.year)

outreg2 using "$results/Table S17.xls",append ctitle("Inactive Days") ///
keep(lowedu5_post_notapwater lowedu5_post) ///
addtext(Individual FE, YES, ProvincebyYear FE, YES) ///
bdec(3) tdec(3) rdec(3)

*Column 3
use "$outfile/Table S17 tumor",clear

reghdfe tumor lowedu5_post_notapwater lowedu5_post lowedu5_notapwater notapwater_post lowedu5 notapwater post $`i' ,absorb(i.id i.province#i.year) cluster(i.province i.year)

outreg2 using "$results/Table S17.xls",append ctitle("Tumor") ///
keep(lowedu5_post_notapwater lowedu5_post) ///
addtext(Individual FE, YES, ProvincebyYear FE, YES) ///
bdec(3) tdec(3) rdec(3)

*Column 4
use "$outfile/Table S17 hour",clear

reghdfe hour lowedu5_post_notapwater lowedu5_post lowedu5_notapwater notapwater_post lowedu5 notapwater post $`i' ,absorb(i.id i.province#i.year) cluster(i.province i.year)

outreg2 using "$results/Table S17.xls",append ctitle("Daily Work Hours") ///
keep(lowedu5_post_notapwater lowedu5_post) ///
addtext(Individual FE, YES, ProvincebyYear FE, YES) ///
bdec(3) tdec(3) rdec(3)

*Column 5
use "$outfile/Table S17 wage",clear

reghdfe wage_100 lowedu5_post_notapwater lowedu5_post lowedu5_notapwater notapwater_post lowedu5 notapwater post $`i' ,absorb(i.id i.province#i.year) cluster(i.province i.year)

outreg2 using "$results/Table S17.xls",append ctitle("Wage_100") ///
keep(lowedu5_post_notapwater lowedu5_post) ///
addtext(Individual FE, YES, ProvincebyYear FE, YES) ///
bdec(3) tdec(3) rdec(3)

}






